package com.sright.bcard.mini.web.task;

import com.sright.bcard.enterprise.share.service.EnterpriseService;
import com.sright.bcard.user.share.service.VisitorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import java.util.Date;

@Configuration
@EnableScheduling
public class ExpireEnterprisePushTask {
    @Autowired
    EnterpriseService enterpriseService;

    @Scheduled(cron = "0 0 9 * * *")
    private void configureTasks() {
        enterpriseService.pushExpireEnterprise();
        System.out.println("试用到期推送定时任务：" + new Date().toString());
    }
}
